﻿using System;
using System.Collections.Generic;
using System.Text;
using Domain.Commons;
using ORM.Annotations;

namespace Motorbike.Model
{
    [EntityTable("b_print_log")]
    public class PrintLog : Identifer
    {
        [EntityFeild("id",Id=true)]
        public string Id { get; set; }

        [EntityFeild("owner_id")]
        public string OwnerId { get; set; }

        [EntityFeild("print_time")]
        public DateTime PrintTime { get; set; }

        [EntityFeild("print_user_id")]
        public string PrintUser { get; set; }

        public static PrintLog create(User user, string ownerId)
        {
            PrintLog printLog = new PrintLog();
            printLog.OwnerId = ownerId;
            printLog.PrintUser = user.Id;
            printLog.PrintTime = DateTime.Now;
            return printLog;
        }
    }
}
